import request from '@/utils/request'

// 查询食物库列表
export function listFoods(query) {
  return request({
    url: '/fitsculpt/foods/list',
    method: 'get',
    params: query
  })
}

// 查询食物库详细
export function getFoods(foodId) {
  return request({
    url: '/fitsculpt/foods/' + foodId,
    method: 'get'
  })
}

// 新增食物库
export function addFoods(data) {
  return request({
    url: '/fitsculpt/foods',
    method: 'post',
    data: data
  })
}

// 修改食物库
export function updateFoods(data) {
  return request({
    url: '/fitsculpt/foods',
    method: 'put',
    data: data
  })
}

// 删除食物库
export function delFoods(foodId) {
  return request({
    url: '/fitsculpt/foods/' + foodId,
    method: 'delete'
  })
}
